<?php
header('Content-type:text/html;charset=UTF8	');

@$id = $_REQUEST['id'];
@$name = $_REQUEST['name'];

if(empty($id)){
	echo json_encode(array('status'=>false,'info'=>'发送数据失败'));
	die;
}

include 'db/li.php';

if($name == "type"){
	@$flog = dbDelete('delete from goods where typeId=:id;
						delete from type where id=:id',array('id'=>$id));
}

if($name == "goods"){
	@$flog = dbDelete('delete from goods where id=:id',array('id'=>$id));
}
	
if(!$flog){
	echo json_encode(array('status'=>false,'info'=>'删除失败'));
	die;
}

echo json_encode(array('status'=>true));